RCDefaultApp

RCDefaultApp is a Mac OS X 10.2 or higher preference pane that allows a user to set the default application used for various URL schemes, file extensions, file types, MIME types, and Uniform Type Identifiers (or UTIs, MacOS 10.4 only).  MacOS X uses the extension and file type settings to choose the application when opening a file in Finder, while Safari and other applications use the URL and MIME type settings at other times for content not related to a file (such as an unknown URL protocol, or a media stream).

RCDefaultApp also allows setting the application when digital cameras or FireWire webcams such as iSight are connected to the computer.  For completeness' sake, there are also settings that mimic the existing "CDs and DVDs" preference pane, which allows setting the action to take when various types of CDs and DVDs are inserted into the computer. 

Finder's Get Info panel can be used to set the default application for file extensions and file types, but it's not intuitive.  Apple's Internet preference pane in MacOS X 10.0 through 10.2 (Jaguar) allowed you to set the Web and Email applications, but no other URL handlers.  In MacOS X 10.3 (Panther), these settings have moved to Safari's and Mail's preferences -- meaning you have to run those applications if you want to choose to not use them.  Similarly, the digital camera preference is located in Image Capture's preferences, and the webcam preference is a checkbox in iChat's preferences.   RCDefaultApp allows the setting of all of this information, and ties everything together in one preference pane.

Installation and Usage

To install RCDefaultApp.prefPane just copy it to ~/Library/PreferencePanes or /Library/PreferencePanes and launch System Preferences.  You may have to create the directory first.  In Panther, you can simply double-click RCDefaultApp.prefPane in the Finder, and System Preferences.app will prompt you where you want it installed.

Using RCDefaultApp is very simple.  There are separate tabs for URLs, Extensions, UTIs, MIME Types, and File Types.  There is also a special pane called "Internet", which sets some of the common URL types and mimics the somewhat specialized handling done by Apple's preferences setting (for example, the "Web" handler sets both the http and https URL protocol handlers).

In each tab, select an entry from the list on the left side, and the popup button shows the application currently set to handle that entry.  The popup has a list of other applications that can also handle that entry; simply choose one to change the default application.  The "<default>" option (where available) will revert to the application that MacOS X would choose if no changes had ever been made for that entry.  If an application does not show up in the list for some reason, the "Other..." option can be chosen, which will open up an Open panel, where you can navigate to the application you want.  Be careful when choosing this option; setting a default application for an entry that the application can not really handle may cause problems for MacOS X when trying to open a file in that application.

If the "<disable>" option is chosen, the entry will be disabled and no application will open the file. This is especially helpful with disabling URL types that have security issues.  (This disabling is accomplished by assigning the entry to a private application that simply exits when launched).

Custom entries can be added by typing the name in the textfield below the list on the left, and clicking the '+' button.  Custom entries (though not existing ones) can be removed by selecting an entry and clicking the '-' button.  Custom protocols can not be added, as applications can only respond to protocols they declare (which are already in the list).

The "Apps" tab is a reverse view which shows the list of available applications.  When an application is selected, the right side will show the set of extensions, URLs, MIME Types, etc. that the application supports.  Each item has a checkbox by its side, and multiple types can be assigned to the application by checking off the desire items and clicking the "Set As Default" button below.  Items already assigned to the application are bolded and the checkbox is disabled.

The "Media" tab is very similar to the other tabs, and it sets preferences for the action to take when various types of media are connected to or inserted into the computer.   These include digital cameras, FireWire webcams such as the iSight, and various types of CDs and DVDs.  The popup is similar to the other tabs, although some items here support an "Ask what to do" option, and "Ignore" is the option to use if nothing should happen.  Several if the items also support a "Perform at login" setting, which means to perform the assigned action immediately following user logon if the type of media is already present.

Typing letters will jump to the closest matching entry in the list.  If more than one entry matches, the space bar can be used to cycle between them (shift-space cycles backwards).  For MIME Types, the "/" character is treated specially: typing "v/m" should jump to the "video/mp4" or at least nearby.  For UTIs, the "." character is similarly treated specially.

The defaults set by RCDefaultApp can be overridden on a per-file basis by using the Get Info panel in Finder.   If a file has a creator set on it, that will also override any RCDefaultApp settings.  For more information on how the Finder chooses application, see the "Determining the Preferred Application" section at:

   http://developer.apple.com/documentation/Carbon/Conceptual/LaunchServicesConcepts/LSCConcepts/chapter_2_section_8.html

(RCDefaultApp enters the picture during step 1, the part about the "binding for the entire document type").

Localization

RCDefaultApp is configured for localization.  For those interested in adding a localization, only the Localizable.strings, InfoPlist.strings, RCDefaultApp.searchTerms, and (if possible) About.rtf files need to be translated.  No nibs should need to be modified.  This README could also be translated, if desired.

Many thanks to those who authored the current localizations:

	Japanese: E-WA and Fumio Yamamoto
	French:	  Gwendal Roué and Claude Le Mestric (through 1.3)
		  Jacky Vaillancourt (2.0)
	German:	  Alexander Nouak
	Italian:	  TF (Monica Cainarca) and Alessio Ciregia
	Chinese:   Shoekai Yeh

Caveats

RCDefaultApp uses private Apple APIs; there is no guarantee that RCDefaultApp will continue to work on future versions of MacOS X.

The ability to revert back to the normal "system default" is somewhat hit-and-miss: it does not work for MIME types on Jaguar, UTIs do not allow reverting at all.  RCDefaultApp hides this option if it is known not to work.

After setting the action for CDs or DVDs, the corresponding Apple preference pane may not show the updated settings.

Feedback

We are very interested in any comments, suggestions, bug reports, or any other feedback on RCDefaultApp; please send them to tools@rubicode.com .

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

(Or, the short version:  If it breaks, or breaks your system, you get to keep the pieces. :-) )

History

2.0	Built as a universal binary for use on Intel Macs.
	Added "Apps" section to assign multiple extensions etc. at once.
	Added "Media" section to allow setting actions when digital cameras and webcams are plugged in (mimicing the preference in Image Capture and iChat).
	Disallows setting an application for the "app" extension and related items, as this causes problems when assigned.
	Uses localized descriptions for URL schemes.
	Changed to use a sheet for the About information, triggered by a small "i" button.
	Fixed a couple of other minor bugs.

1.3	Fixed operation on MacOS X 10.4 (Tiger).
	The <default> option works in more places now.
	Added support for Uniform Type Identifiers (UTIs) on MacOS X 10.4.  This will not be too useful until more applications support them. 
	Fixed potential <disable> problem following 2005-004 security patches for Mac OS X 10.2 and 10.3.
	Fixed Italian localization; most of it was not working.
	Slightly improved ability to find application information.

1.2.1	Fixed operation on MacOS X 10.2.

1.2	Added ability to add custom extensions, MIME types, and OS types.
	Typing letters will now jump to the nearest matching entry in the list.
	Added Italian localization. (contributed by Alessio Ciregia and TF (Monica Cainarca) )
	Added Chinese traditional and simplified localizations. (contributed by Shoekai Yeh)
	Added French README file. (contributed by Claude Le Mestric)
	Added RSS selection (i.e. feed:// protocol) to the Internet pane. (suggested by Håkan Björk)
    	Fixed bugs with handling malformed application Info.plist files.

1.1.1	Added Japanese localization. (contributed by E-WA and Fumio Yamamoto)
	Added French localization. (contributed by Gwendal Roué)
	Added German localization. (contributed by Alexander Nouak)

1.1	Added <disable> option so that URL schemes etc. can be turned off.  (suggested by Paul Hoffman)

1.0	Initial release.

Copyright © 2004-2006 Carl Lindberg